import json

import config


def build_json(json_file):
    test_data = []

    with open(file=json_file, mode='rb') as f:
        json_data = json.load(f)

        for case_data in json_data:
            desc = case_data.get("desc")
            req_data = case_data.get("req_data")
            status_code = case_data.get("status_code")
            success = case_data.get("success")
            code = case_data.get("code")
            message = case_data.get("message")

            test_data.append((desc, req_data, success, status_code, code, message))

    return test_data


if __name__ == '__main__':
    print(build_json(config.BASE_PATH + "/data/ihrm_data.json"))
